package halberd.example;

import java.io.File;

import halberd.FilterChain;
import halberd.data.ImgData;
import halberd.filter.*;
import halberd.io.BufferedImageOut;
import halberd.io.FileIn;
import halberd.io.Imagewriter;

public class HelloImage {

	public static void main(String[] args) {
		FilterChain filterChain=new FilterChain();
		filterChain.add(new GrayFilter());
		filterChain.add(new SobelFilter());
		ImgData imgData=filterChain.process((new FileIn()).convert(new File("c:\\1.jpg")));
		Imagewriter.write("d:\\1.jpg", (new BufferedImageOut()).convert(imgData));
		//Imagewriter.write("d:\\1.jpg", (new BufferedImageOut())
		//		.convert((new OtsuFilter()).process((new GrayFilter()).process((new FileIn()).convert(new File("c:\\1.jpg"))))));
		//Imagewriter.write("d:\\1.jpg", (new BufferedImageOut())
		//		.convert((new GrayFilter()).process((new FileIn()).convert(new File("c:\\1.jpg")))));
		// Imagewriter.write("d:\\1.jpg", (new BufferedImageOut()).convert((new
		// NegativeFilter()).process((new FileIn()).convert(new File("c:\\1.jpg")))));
		// Imagewriter.write("d:\\1.jpg", (new FileOut()).convert((new
		// ShiftFilter(true)).process((new FileIn()).convert(new File("c:\\1.jpg")))));
	}

}
